package com.wyd.facade;

import com.wyd.facade.receiver.Door;
import com.wyd.facade.receiver.Light;
import com.wyd.facade.receiver.Window;

/**
 * 外观模式
 * 遵循了最小知识原则，降低多接口使用的复杂度
 *
 * @author Yudi Wang
 * @date 2022/1/30 11:35
 */
public class Main {
    public static void main(String[] args) {
        HomeController homeController = new HomeController(new Door(), new Light(), new Window());
        homeController.on();
        System.out.println("======================");
        homeController.off();
    }
}
